package classes
{
	import classes.controller.StartCommand;
	
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;
	
	public class OX_Application extends Facade implements IFacade
	{
		//------notifiacations.
		public static const STARTUP:String 						= "startup";
		public static const INITIALIZE_SITE:String				= "initializeSite";
		
		public static const THE_FIRST_EXECUTE:String			= "theFirstExecute";   			// 완전 처음 실행 했을 시.
		public static const APPLICATION_EXECUTE:String			= "applicationExecute";		 	// 첫실행.
		public static const INCORRECTQUESTION_EXECUTE:String	= "incorrectquestionExecute";	// 오답노트를 통해서 들어 왔을 경우.
		
		public static const UTIL_CLICK_EVENT:String				= "utilClickEvent";  	  		// 상단 인포바 클릭.
		public static const CLICK_EVENT:String					= "clickEvent";        			// 클릭 이벤트들.
		
		public static const WAITING_ROOM_IN:String				= "waitingRoomIn";				//waiting room.
		public static const WAITING_ROOM_CREATE:String			= "waitingRoomCreate";			//waiting room create.
		public static const WAITING_PERSONAL_INFO:String		= "waitingPersonalInfo";		//waiting room 에서 개인 정보.
		
		public static const LIST_ROOM_ON:String					= "list_room_on";				//list room.
		public static const LIST_ROOM_OFF:String				= "list_room_off";
		
		public static const GAME_START:String					= "gameStart";					//gameStart
		public static const READY_SCREEN:String					= "readyScreen";				//ready!
		public static const GAME_ROOM_OFF:String				= "gameRoomOff";
		
		public static const GAME_OVER :String 					= "gameOver";					//gameOver.
		
		public static const SINGLE_ROOM_START:String			= "singleRoomStart";			//singleRoomStart.
		public static const SINGLE_GAME_OVER:String				= "singleGameOver";				//singleGameOver.
		public static const SINGLE_GAME_PAUSE:String			= "singleGamePause";			//singleGamePause.
		public static const SINGLE_TO_LIST:String				= "singleToList";				//singleTolist.
		public static const SINGLE_ROOM_OFF:String				= "singleRoomOff";				//singleRoomOn. 
		public static const SINGLE_RE_ON:String					= "singleReOn";					//singleRestart.
		
		public static const SINGLE_POPUP_INCORRECT:String		= "singlePopupIncorrect";		//incorrectPopup.
		public static const SINGLE_POPUP_SETTING:String			= "singlePopupSetting";			//settingPopup.
		
		public static const LOADING_IN:String					= "loadingIn";					//loadingIn.
		public static const LOADING_OUT:String					= "loadingOut";					//loadingOut.
			
		//---------------------
		public static function getInstance():OX_Application
		{
			if(instance == null) instance = new OX_Application();
			return instance as OX_Application;
		}
		public function startup( $stage:Object ):void
		{
			sendNotification( STARTUP, $stage);
		}
		override protected function initializeController():void
		{
			super.initializeController();
			registerCommand( STARTUP, StartCommand);
		}
	}
}
